<?php if (!defined('THINK_PATH')) exit();?>﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
        <title><?php echo ($title); ?></title>
     <meta name="keywords" content="<?php echo ($keywords); ?>"/>
     <meta name="description" content="<?php echo ($description); ?>"/>
     
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！-->
    <title></title>
    <link rel="stylesheet" href="App/Wap/public/css/style.css"/>
</head>
<body>
<div class="header">
    <a href="javascript:history.go(-1)" class="backBtn"></a>
    <span class="title">始于复杂，成于简单</span>
</div>

<div class="infList">
    <ul>
        
        <?php if(is_array($list) && !empty($list) ): foreach($list as $key=>$item): ?><li>
            <a href="<?php echo U('Article/detail','&id='.$item['id']);?>">
                <span class="time"><span class="date"><?php echo (date('d',$item["add_time"])); ?></span><span class="mouth"><?php echo (date('Y',$item["add_time"])); ?>/<?php echo (date('m',$item["add_time"])); ?></span></span>
                <img src="/Uploads/art/<?php echo ($item["pic_path"]); ?>" class="pic">
                <span class="title"><?php echo ($item["title"]); ?></span>
                <span class="det"><?php echo ($item["description"]); ?></span>
            </a>
        </li><?php endforeach; else: endif; ?>
        
        
        
    </ul>
    <span class="loadingText"><span>加载中...</span></span>
</div>

<div class="pageFooter inf">
    <span class="text">Copyright © 2017-2017 简单商城 保留公司所有权利</span>
    <span class="text">辽ICP备11047843号 Copyright2017-2017</span>
</div>

<!--<script src="App/Wap/public/js/jquery-2.1.1.min.js"></script>-->
<script>
    var len = $(".infList ul li").length;
    if( len == 20 ){
        $(".loadingText").css({"display":"block"})
    }

    $(window).scroll(function(){
        var scrollHei = $(window).scrollTop();
        var viewHei = $(window).height();
        var pageHei = $(".infList").outerHeight() + 44*1;
        if( pageHei - viewHei - scrollHei < 20 ){
            for( var i =0; i < 10; i++ ){
                var html = '<li>\
                    <a href="<?php echo U('Article/detail','&id='.$item['id']);?>">\
                    <span class="time"><span class="date"><?php echo (date('d',$item["add_time"])); ?></span><span class="mouth"><?php echo (date('Y',$item["add_time"])); ?>/<?php echo (date('m',$item["add_time"])); ?></span></span>\
                    <img src="/Uploads/art/<?php echo ($item["pic_path"]); ?>" class="pic">\
                    <span class="title"><?php echo ($item["title"]); ?></span>\
                <span class="det"><?php echo ($item["description"]); ?></span>\
                </a>\
                </li>'
                $(".infList ul").append(html)
            }
        }
    })
</script>
</body>
</html>